import React, { useState } from 'react'
import { RightOutlined, DownOutlined } from '@ant-design/icons'
export default (props: any) => {

    const { dataList, isShow = false } = props

    const [visable, setVisable] = useState(isShow)

    let ulStyle: any = { margin: "5px 0 0 20px", padding: "0", listStyleType: "disc" }
    !visable && (ulStyle.display = "none")

    return (
        <div style={{ padding: "20px", borderRadius: "8px", backgroundColor: "white", marginBottom: "15px" }}>
            <div onClick={() => setVisable(!visable)}>操作提示   {visable ? <DownOutlined /> : <RightOutlined />} </div>
            <ul style={ulStyle}>
                {
                    dataList.map((item: any, inx: number) => <li key={inx}>{item}</li>)
                }
            </ul>
        </div>
    )
}